<?php
  
  require_once('Connections/congress.php'); 

  include('functions.php');

  $seq = getNextValSeq("author");

  $insertSQL = sprintf("INSERT INTO AUTHOR (ID_AUTHOR, ID_CONGRESS, NAME, ORGANIZATION, COUNTRY) VALUES (%s, %s, '%s', '%s', '%s')",
                       $seq, $_GET['idCongress'], $_GET['name'], $_GET['org'], $_GET['country']);

  mysql_select_db($database_congress, $congress);

  mysql_query($insertSQL, $congress) or die(mysql_error());

  echo $seq;

?>

